package com.ccc.dao.impl;

import javax.annotation.Resource;

import org.hibernate.SessionFactory;
import org.springframework.stereotype.Component;

import com.ccc.dao.RegisterDao;
import com.ccc.model.Register;
@Component("registerDao")
public class RegisterDaoImpl implements RegisterDao {
	@Resource
	private SessionFactory sessionFactory;
	@Override
	public Register find() {
		return (Register)this.sessionFactory.getCurrentSession().createQuery("from Register").uniqueResult();
	}
	@Override
	public void update(Register r) {
		this.sessionFactory.getCurrentSession().merge(r);
	}

}
